package com.wpp.rpc.service;

import com.wpp.rpc.api.ComplexService;
import com.wpp.rpc.model.Message;
import com.wpp.rpc.model.MessageList;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class ComplexServiceImpl extends UnicastRemoteObject implements ComplexService {
    public ComplexServiceImpl() throws RemoteException {
    }

    MessageList source = new MessageList();

    public MessageList addMessage(Message msg) throws RemoteException {
        source.addMessage(msg);
        return source;
    }
}
